@extends('Admin/index')

@section('content')

    <div class="app-third-sidebar">
        <nav class="ui-nav " style="display: block;">
            <ul>
                <li>
                    <a href="/admin/record"><span>日志</span></a>
                </li>
            </ul>
        </nav>
    </div>

    <div id="wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="row">
                    <div class="col-md-10" >
                        <form class="form-inline" id="search-form" onsubmit="return false;">
                            <div class="input-group">
                                <input type="text" class="form-control" name="iSeqId" placeholder="流水">
                            </div>
                           {{-- <div class="input-group">
                                <input type="text" class="form-control" name="iRecordType" placeholder="记录类型">
                            </div>--}}
                            <div class="input-group">
                                <input type="text" class="form-control" name="sModifyUser" placeholder="修改者">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" name="search" type="button">查询</button>
                                    <button class="btn btn-warning" name="to-reset" type="button">重置</button>
                                </span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <br>

        <div class="row">

            <div class="col-lg-12">
                <div id="toolbar">

                </div>
                <table id="table"></table>
            </div>

        </div>

    </div>

@endsection

@section('js')

    <script>

        var bootstrap_table_ajax_url = '/admin/searchRecord/';

        $('#table').bootstrapTable({
            classes: 'table table-hover', //bootstrap的表格样式
            sidePagination: 'server', //获取数据方式【从服务器获取数据】
            pagination: true, //分页
            height: $(window).height()-100, //表格高度
            pageNumber: 1, //页码【第X页】
            pageSize: 20, //每页显示多少条数据
            queryParamsType: 'limit',
            queryParams: function (params) {
                var dt = E.getFormValues('search-form');
                $.extend(params, dt);
                return params;
            },
            url: bootstrap_table_ajax_url,//ajax链接
            sortName: 'dtCommitTime', //排序字段
            sortOrder: 'DESC',//排序方式
            columns: [ //字段

                { title: '流水', field: 'iSeqId', align: 'left', width: '20px'  },
                { title: '操作者 ',field:'sModifyUser', align: 'left' ,width: '100px' },
                { title: 'IP地址 ',field:'sIp', align: 'left' ,width: '100px' },
               /* { title: '记录Sql', field: 'iRcordSql', align: 'left', width: '200px'  },
                { title: '记录类型',  field: 'iRecordType', align: 'left' ,width: '50px' },*/
                { title: '时间',  field: 'dtCommitTime', align: 'left' ,width: '100px' },
               /* { title: '错误码 ',field:'iRecordCode', align: 'left' ,width: '50px' },*/
                { title: '备注 ',field:'sRecordRemark', align: 'left' ,width: '200px' },

                { title: '操作', field: 'operation', align: 'center', width: '200px' },
            ]

        });




    </script>

@endsection
